<?php
require 'basic.inc.php';
if($loged == 1){
	$act = 'home';
}else{
	if(!in_array($act, array('login', 'loged'))){
		$act = 'login';
	}
}
switch ($act){
	case 'login':
		include_once 'tpl/login.phtml';
		break;
	case 'loged':
		if($loged != 1){
			$_SESSION['loged'] = 1;
		}
		header('Location: index.php?act=home');
		break;
	case 'home':
		include_once 'tpl/index.phtml';
		break;
	default:
		header('Location: http://www.eueang.com/');
		break;
}
//end